The present invention relates to an image processing device to enlarge and reduce images by an interpolation method.
Image recorders to record an original image through enlarging or reducing operation have been developed. When enlarging or reducing an image to be recorded, with such image recorders having a solid state image sensor, such as a charge coupled device (CCD) or the like, to read an original image which is converted into electrical image signals, the spaces among pixels read out by a solid state image sensor on an original image are continuously compensated so as to produce image signal having near-curvilinear waveform, which is sampled at varied sampling invervals corresponding to required enlarging or reducing ratio, thus providing an enlarged or reduced image.
However, such an arrangement disadvantageously involves many and complicated arithmetic operations to fill data into the spaces among pixels on a solid state image sensor, resulting in complicated circuitry. Additionally, there is a conventionally known method to modify the frequency of a reading signal, that is, a transfer clock signal, for an original image which has been read by a solid state image sensor (Japanese Patent Publication Open to Public Inspection, hereinafter referred to as Japanese Patent O.P.I. Publication, No. 146358/1981). More specifically, in the case of an enlargement recording operation, an period of transfer clock signal is set larger than that of the same scale ratio recording operation which records the image in same size with the original size thereof. On the contrary, in the case of reducing recording operation, the period is set smaller than that of the same scale ratio recording operation. However, especially in the case of an enlarging operation, such an arrangement fails to provide interpolation data which compensates data between the arbitrary pixels. With the above-mentioned method, as the transfer clock signal to be used for enlarging or reducing recording operation is generated based on the reference clock to be used in the recording operation with the same scale ratio, a circuit for generating such a transfer clock signal is required. Additionally, modifying the period of transfer clock signal for enlarging or reducing operation necessitates controlling the exposure (time), and a circuit for this purpose. Furthermore, as an image is recorded employing the image data sampled in compliance with the transfer clock signal having a specified frequency, in order to carry out enlarging or reducing operation in accordance with the above-mentioned method, the enlargement of, for example, an oblique line emphasizes ruggedness and deteriorates smoothness, resulting in disadvantageously poor image quality.
In the case where a photoelectric conversion element such as a CCD or the like is utilized as an image reading means in an image recording device which is capable of enlarging and reducing an original image, some methods provide enlarged or reduced image signals by adding or reducing appropriate image data to or from the pixel data read on an original image in accordance with an enlarging or reducing ratio.
FIG. 30 is a block diagram illustrating the principal area of one processing system, employed to carry out enlarging and reducing operation, which is incorporated into such an image processing device.
In this figure, numeral 40 denotes a memory for image data, and image data read by an image reading means is fed into an input terminal 41 of memory 40, after being processed for enlargement or reduction. Output image data outputted from an output terminal 42 is transferred to a recorder or the like, which reproduces an enlarged or reduced image.
In enlarging and reducing operations, the recording width of a recorder restricts the amount of image data being fed into the memory 40. In this case, the timing signal, which is generated at the address signal generator 47 and is fed into the memory 40, is controlled in accordance with either an enlarging or reducing operation.
To achieve this, preset-capable first and second counters, 43 and 44, are incorporated. When a clock signal CLK 2 (31-c in FIG. 31) having a predetermined frequency has been counted until the preset value P1 of the counter 43 and the preset value P2 of the counter 44 are reached, the first and second output pulses C1 and C2 (31-d and 31-e in FIG. 31) are generated. The first output pulse C1 sets a flipflop 45, and the second output pulse C2 resets the flipflop 45, generating a window pulse WP shown by F in the figure. Such a window pulse WP is supplied as a gate pulse into a gate circuit 46, and a clock signal CLK2 is supplied as long as the duration W1 of the window pulse WP into the address signal generator 47. Incidentally such a clock signal CLK2 is a clock signal synchronous to the enlarged or reduced image data.
As a result, as the address data to be fed into the memory 40 is generated for the duration W1, the image data (31-g in FIG. 31) corresponding with the duration W1, among the image data (31-b in FIG. 31) restricted by a horizontal direction valid signal (H-VALID) shown by 31-a in FIG. 31, is written into the memory 40.
Accordingly, by varying the preset values P1 and P2 in accordance with the enlarging or reducing scale ratio, the duration W1 of the window pulse WP varies in proportion to the variation in the scale ratio, this in turn defines the amount of the image data to be written into the memory 40.
In the case of reducing operation, the processing is carried out with the duration of the window pulse WP being equal to that of the horizontal direction valid signal (H-VALID). Contrary, in the case of enlarging operation, as the amount of image data increase, the duration of the window pulse is set shorter beforehand than that of the horizontal direction valid signal (H-VALID) so as to decrease the amount of data.
Incidentally, such a conventional image processing system, mentioned above, causes the following disadvantages.
In other words, with a system constitution in FIG. 30, the first address (address 0) is always designated as the initial address from where the data is to be written into, regardless of the scale ratio, though the amount of the image data to be written into the memory 40 is limited in compliance with the enlarging or reducing scale ratio. For this reason, especially when such a constitution is incorporated into an image processing system whose reading or recording device reads or records an original draft by referring to the center of a recording paper, the image to be recorded may be, depending on the scale ratio, recorded outside the recording zone of the recording paper.
For example, assuming that W in FIG. 32 is the maximum readable width of an image reading means, an image can be recorded as shown in FIG. 33 at the same scale ratio mode with the system wherein the image data of an original draft 52 is read out by using the center line l of a draft table 51 and the image is recorded based on the center line l. However, in the case of reducing operation, such a recorded image appears as shown by 33-a in FIG. 33.
This is because the initial writing address on the memory 40, that is address 0, corresponds with a initial writing address in an output device (a recorder such as a laser printer). Consequently, if a recording paper 53 to record an image is small-sized, the reduced image may not be correctly recorded on the paper, because an image may overflow from the recording-capable zone on the paper.
Even if a recording paper 53 has a larger size, the reduced image is disadvantageously recorded as being unexpectedly located to one corner of the recording paper 53.
Additionally, the blank area of an original draft is also enlarged in the enlarging operation, and, the resultant enlarged image appears as shown by 33-c in FIG. 33. For this reason, a needed area of image may fail to be recorded on a specific recording paper 53.
To solve such disadvantages, it is possible to conceive a method wherein the image data with enlarging or reducing data incorporated is temporarily stored in an output buffer circuitry, then, transferred to and stored in a memory at final stage or fed into an output device which records the image.
As can be understood from the reasons described later, such a method can solve, by controlling the timing for writing the image data into or reading out such data from the output buffer circuitry in correspondence with the enlarging or reducing scale ratio, the disadvantages such as the recording of a reduced image offset to one side of a recording paper and the recording of an enlarged image with its part missing.
However, the incoporation of such an output buffer circuitry poses still another disadvantage.
In other words, an output buffer circuitry sometimes employs a line memory or the like to store the image data. In this case, with such a line memory, the data in line memory may uncertainly become either "1" or "0" during a rising stage of an operation for example when power is turned on for an image processing device. That is, the probability is 50%.
Consequently, if the data is in all clear ("0") status, there is no specific disadvantage. However, if not so, the inability to identify the original image data may render the reading of correct image data impossible.
Similar problems may happen even in modification of scale ratio. That is, in the case where the scale ratio is changed to smaller value, for example, from the enlarging mode to the reducing mode, the former image data remains unchanged in the line memory. In such a case, again it is impossible to distinguish the newly written image data from the former image data, posing a new disadvantage similar to the above-mentioned one.
Therefore it is the object of the present invention to provide, in order to eliminate the above-mentioned conventional disadvantages, an image processing having a capability of enlarging and reducing operations and being able to correctly write image data even if a line memory is in an unstable status.
Naturally, according to the invention, a reduced image is not recorded at one corner on a reducing paper, or, a part of an image to be recorded is not missing.
Additionally, a conventional image processing system is such that the reading resolution of an image reading means is designed to conform to the recording resolution of a recording means for the image data having been read.
However, as various recording systems have become more popular recently, a recording means having a recording resolution different from a reading resolution is sometimes connected for use with such a system. In such an image processing system, the scale ratio designation conducted externally is exclusively carried out on an image reading means. Therefore, the difference between the reading resolution and the recording resolution causes the failure in correct recording of an image in the designated scale ratio.
For example, when the reading resolution is 16 dots/mm and the recording resolution is 8 dots/mm, the recorded image is enlarged twice as large as the original image, even if the same scale ratio is designated externally. On the other hand, when the reading resolution is 8 dots/mm and the recording resolution is 16 dots/mm, the recorded image is reduced to half the original image.
With such a conventional system, as no means is provided to solve such disadvantages, it is necessary to preset a designated scale ratio corresponding to the relevant solution in order to allow the original image to be recorded correctly in the designated scale ratio, when the reading resolution and the recording resolution are different.
However, such a modification is extremely cumbersome and sometimes causes errors.
Therefore, it is the object of the present invention to propose an enlarging/reducing capable image processing device which can provide the recorded image in accordance with the specified scale ratio, even though a recording means having the recordiing resolution different from the reading resolution is connected to the device in order to process an image.
Among image recording devices which can enlarge or reduce an original image, in image processing system is available, wherein the image data outputted from the image processing device is transferred to a host computer in order to display the data on a display device or the like provided in the host computer.
Incidentally, with such a conventional image processing system, various image processing operations are executed based on the instructions from the host computer. Additionally, with this type of image processing system, a plurality of recording means are provided in the output device side which is connected to the image processing device, wherein the most suitable recording means may be selected by the instructions from the host computer.
In such an image processing system, the scale ratio instructions from the host computer are exclusively directed to the image reading means. Accordingly, when the reading resolution differs from the recording resolution, the image is not correctly recorded, even if the image is processed in accordance with the designated scale ratio.
Therefore, it is the object of the invention to provide, in regard to the above-mentioned image processing systems, an enlarging/reducing capable image processing system which can produce a recorded image of the size in accordance with the scale ratio designated from the host computer even if the image processing is executed by connecting a recording means which has the recording resolution different from the recording resolution.